home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / gopher+1.2b4 / object / VIews.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-19  |  2.3 KB  |  85 lines

  1. /********************************************************************
  2.  * lindner
  3.  * 3.2
  4.  * 1993/02/19 21:33:24
  5.  * /home/mudhoney/GopherSrc/CVS/gopher+/object/VIews.h,v
  6.  * Exp
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: VIews.h
  14.  * Header file, abstraction of a gopher+ view.
  15.  *********************************************************************
  16.  * Revision History:
  17.  * VIews.h,v
  18.  * Revision 3.2  1993/02/19  21:33:24  lindner
  19.  * Gopher1.2b2 release
  20.  *
  21.  * Revision 3.1.1.1  1993/02/11  18:03:07  lindner
  22.  * Gopher+1.2beta release
  23.  *
  24.  * Revision 2.1  1993/02/09  22:48:34  lindner
  25.  * Changes for multilingual views
  26.  *
  27.  * Revision 1.1  1993/01/31  00:34:40  lindner
  28.  * Initial revision
  29.  *
  30.  *
  31.  *********************************************************************/
  32.  
  33. #ifndef VIEWS_H
  34. #define VIEWS_H
  35.  
  36.  
  37. #include "STRstring.h"
  38. #include "boolean.h"
  39.  
  40. struct view_struct 
  41. {
  42.      String *Type;
  43.      String *Lang;
  44.      String *Size;
  45.      String *comments;
  46. };
  47.  
  48. typedef struct view_struct VIewobj;
  49.  
  50. #define VIgetType(a)     ((STRget((a)->Type)))
  51. #define VIgetLang(a)     ((STRget((a)->Lang)))
  52. #define VIgetSize(a)     ((STRget((a)->Size)))
  53. #define VIgetComments(a) ((STRget((a)->comments)))
  54.      
  55. #define VIsetType(a,b)     (STRset((a)->Type,(b)))
  56. #define VIsetLang(a,b)     (STRset((a)->Lang,(b)))
  57. #define VIsetSize(a,b)     (STRset((a)->Size,(b)))
  58. #define VIsetComments(a,b) (STRset((a)->comments,(b)))
  59.  
  60. /** Real view functions in VIews.c **/
  61. VIewobj *VInew();
  62. void     VIinit();
  63. void     VIcpy();
  64. void     VIdestroy();
  65. void     VItoLine();
  66. boolean  VIfromLine();
  67. char    *VIgetViewnLang();
  68. char    *VIprettyLang();
  69.  
  70. /*******************************************************/
  71. /** This stuff is for a dynamic array of VIewobjs     **/
  72.  
  73. #include "DAarray.h"
  74.  
  75. typedef DynArray VIewArray;
  76. #define VIAnew(a)        (DAnew((a),VInew,VIinit,VIdestroy,VIcpy))
  77. #define VIAinit(a)       (DAinit((a)))
  78. #define VIAgetTop(a)     (DAgetTop(a))
  79. #define VIAgetEntry(a,b) (VIewobj*)(DAgetEntry(a,b))
  80. #define VIApush(a,b)     (DApush((DynArray*)(a),(b)))
  81. #define VIAdestroy(a)    (DAdestroy(a))
  82. #define VIAcpy(a,b)      (DAcpy(a,b))
  83.  
  84. #endif
  85.